package com.ht.common.core.utils;

import java.io.PrintWriter;
import java.io.StringWriter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 * 打印异常日志
 * @author zmx
 * @date
 *
 */
public class ErrorUtils {
	protected final static Logger logger = LoggerFactory.getLogger(ErrorUtils.class);
	public static void printErr(Exception e) {
		StringWriter sw = new StringWriter();
		PrintWriter pw = new PrintWriter(sw);
		e.printStackTrace(pw);
		logger.error("未知异常：{}",sw.toString());
	}
}
